package com.aaa.web.service.impl.financeserviceimpl;

import com.aaa.entity.BackExpenseorder;
import com.aaa.entity.repair.BackEntrepotrecordCll;
import com.aaa.web.commons.WlCommonsCode;
import com.aaa.web.dao.ifinancedao.IFinanceInfoDao;
import com.aaa.web.service.ifinance.IFinanceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName FinanceInfoServiceImpl
 * @Description TODO
 * @Author caolinlin
 * @Date 2018/12/27 16:12
 **/
@Service
public class FinanceInfoServiceImpl implements IFinanceInfoService {
    @Autowired
    private IFinanceInfoDao iFinanceInfoDao;

    /**
     * 月收入支出
     * @param years
     * @return
     */
    @Override
    public List<BackExpenseorder> getFinanceInAndOut(String years) {
        int schoolId = WlCommonsCode.isAdmin();
        return iFinanceInfoDao.getFinanceInAndOut(years,schoolId);
    }

    /**
     * 年收入类型
     * @param years
     * @return
     */
    @Override
    public List<BackExpenseorder> getFinanceInFrom(String years) {
        int schoolId = WlCommonsCode.isAdmin();
        return iFinanceInfoDao.getFinanceInFrom(years,schoolId);
    }

    /**
     * 月支出类型
     * @param years
     * @return
     */
    @Override
    public List<BackEntrepotrecordCll> getFinanceOutFrom(String years) {
        int schoolId = WlCommonsCode.isAdmin();
        return iFinanceInfoDao.getFinanceOutFrom(years,schoolId);
    }
}
